package org.ccahouse.ccacommons.base;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * 基础 <code>Bean</code>，包含基础属性定义
 *
 * @author kevin
 * @version 0.1
 * @since 2020-07-03
 */
@Getter
@Setter
@ToString
@EqualsAndHashCode
public class BaseEntity implements Serializable {

    @TableField(exist = false)
    private static final long serialVersionUID = 1253361180281579292L;

    @TableId(type = IdType.AUTO)
    private Integer id;

//    @TableField(value = "create_by", fill = FieldFill.INSERT)
//    private String createBy;
//
//    @TableField(value = "create_at", fill = FieldFill.INSERT)
//    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
//    private Date createAt;

//    @TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
//    private String updateBy;

//    @TableField(value = "update_at", fill = FieldFill.INSERT_UPDATE)
//    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
//    private Date updateAt;
}
